home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Xconq 7.1.0 / lib / makedir.pl < prev    next >
Encoding:
Perl Script  |  1996-04-04  |  466 b   |  21 lines  |  [TEXT/ttxt]

  1. #! /usr/unsupported/bin/perl
  2. foreach $file (@ARGV) {
  3.     open(IMF,"<$file") || warn "Cannot open $file.\n";
  4.     while (<IMF>) {
  5.     if (/imf\s*\"([^\"]*)\"/) {
  6.         $imf = $1;
  7.         if ($where{$imf} && $where{$imf} ne $file) {
  8.         warn "Family $imf present in files $where{$imf} and $file.\n";
  9.         } else {
  10.         $where{$imf} = $file;
  11.         }
  12.     }
  13.     }
  14. }
  15.  
  16. print "ImageFamilyName FileName\n";
  17. foreach $imf (sort keys(%where)) {
  18.     print "$imf $where{$imf}\n";
  19. }
  20. print ". .\n";
  21.